<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/view/commom/header.jspf"%>
		<center><h1>求职者主页</h1></center>
		<hr>
		<p class = "bg-success">${success}</p>
		<p class = "bg-danger">${fail }</p>
		
<table class="table">
	<caption>
		<strong>一、简历管理：</strong><a
			href="<%=request.getContextPath()%>/static/talent/resume-add.jsp">新增简历</a>
	</caption>
	<thead>
		<tr>
			<th>编号</th>
			<th>求职意向</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		<c:if test="${empty resumeList }">
			<tr>
				<td colspan="3" align="center">还没有创建简历~</td>
			</tr>
		</c:if>
		<c:if test="${!empty resumeList }">
			<c:forEach items="${resumeList }" var="resume" varStatus="v">
				<tr>
					<th scope="row">${v.count }</th>
					<td>${resume.intention }</td>
					<td><a href = "<%=request.getContextPath()%>/ResumeServlet?command=preupdate&id=${resume.id}">修改</a>|<a href = "<%=request.getContextPath()%>/ResumeServlet?command=delete&id=${resume.id}" onclick = "return confirm('是否删除？');">删除</a></td>
				</tr>
			</c:forEach>
		</c:if>
	</tbody>
</table>


<table class="table">
	<caption>
		<strong>二求职管理：</strong>
	</caption>
	<thead>
		<tr>
			<th>编号</th>
			<th>求职意向</th>
			<th>申请职位</th>
			<th>所在公司</th>
			<th>申请时间</th>
			<th>目前状态</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		
			<c:forEach items="${pageModel.list }" var="application"  varStatus="v">
			<%-- <c:forEach items="${applicationList }" var="application"  varStatus="v"> --%>
				<tr>
					<th scope="row">${v.count }</th>
					<td>${application.resume$intention }</td>
					<td>${application.position$name }</td>
					<td>${application.company$name }</td>
					<td><fmt:formatDate value="${application.appTime }"
						pattern="yyyy-MM-dd HH:mm:ss" /></td>
				
					<td>${application.statusStr }</td>
					<td><a href = "<%=request.getContextPath()%>/ApplicationServlet?command=preUpdate&id=${application.id}">修改</a>
					|<a href = "<%=request.getContextPath()%>/ApplicationServlet?command=delete&id=${application.id}" onclick = "return confirm('是否删除？');">删除</a></td>
				</tr>
			</c:forEach>
		
		<tr>
			<td colspan="7" align="right">
				<a href="<%=request.getContextPath()%>/ApplicationServlet?command=listTalentApplyByPage&pageNo=${pageModel.first}">首页</a>&nbsp;
				<a href="<%=request.getContextPath()%>/ApplicationServlet?command=listTalentApplyByPage&pageNo=${pageModel.pre}">上一页</a>&nbsp;
				第<select onchange="goPage(this)">
				 	<script>
				 		var pageNo = '${pageModel.pageNo }';
				 		var totalPage = '${pageModel.totalPage }';
				 		for (var i = 1; i <= totalPage; i++) {
				 			if (pageNo == i) {
				 				document.write('<option value="' + i + '" selected="selected">' + i + '</option>');
				 			} else {
				 				document.write('<option value="' + i + '">' + i + '</option>');
				 			}
				 		}
				 	</script>
				 </select>页
				,共${pageModel.totalPage }页&nbsp;
				<a href="<%=request.getContextPath()%>/ApplicationServlet?command=listTalentApplyByPage&pageNo=${pageModel.next}">下一页</a>&nbsp;
				<a href="<%=request.getContextPath()%>/ApplicationServlet?command=listTalentApplyByPage&pageNo=${pageModel.last}">尾页</a>&nbsp;
				共${pageModel.allRecords }条记录
			</td>
		</tr>
	</tbody>
</table>
		
<%@ include file="/view/commom/footer.jspf"%>